package edu.sctu.zhoumengxue.day201505.day20150522;


/**
 * Created by user12 on 2015/5/22.
 */
public class Main {
    public static void main(String[] args) {
        DogTextOne dogTextOne = new DogTextOne(textinterface);
        dogTextOne.getColor();
        dogTextOne.getSize();
        dogTextOne.getAction();
        dogTextOne.getSysOut();

        DogTextTwo dogTextTwo = new DogTextTwo(new TextInterFace() {
            @Override
            public void getInfo(String color, int size, String action) {
                System.out.println("颜色：" + color + "大小：" + size + "动作：" + action);
            }
        });
        dogTextTwo.getColor();
        dogTextTwo.getSize();
        dogTextTwo.getAction();
        dogTextTwo.getSysOut();
    }

        static TextInterFace textinterface = new TextInterFace() {

            @Override
            public void getInfo(String color, int size, String action) {
                System.out.println("颜色："+color+"大小："+size+"动作："+action);

            }
        };


}
